<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 比较</title>
</head>
<body>
<h2>比较运算符</h2>
<p>==	等于</p>
<p>把 5 赋值给 x，然后显示比较 (x == 8) 的值：</p>

<p id="demo1"></p>
<p id="demo2"></p>
<script>
  var x = 5;
  document.getElementById("demo1").innerHTML = (x == 8);   //false
  document.getElementById("demo2").innerHTML = (x == 5);   //true
</script>
</body>
</html>

